home *** CD-ROM | disk | FTP | other *** search
- /*
-
- pcput2.hpp
- 7-30-91
- Write two color text strings
-
- Copyright 1991
- John W. Small
- All rights reserved
- Use freely but acknowledge authorship and copyright.
-
- PSW / Power SoftWare
- P.O. Box 10072
- McLean, Virginia 22102 8072 USA
-
- John Small
- Voice: (703) 759-3838
- CIS: 73757,2233
-
- */
-
- #ifndef PCPUT2_HPP
- #define PCPUT2_HPP
-
- #include <conio.h>
-
- #define MAX_SCR_LN_BUF 132
-
-
- struct ScrLnBuf {
- static int buf[MAX_SCR_LN_BUF];
- int normattr, highattr;
- unsigned pgWidth;
- unsigned startColumn;
- int clreol;
- char lineTermChar;
- unsigned tabSpacing;
- char attrToggleChar;
- int eolColumn, lidx;
- void set(int normattr = WHITE+BLUE*16,
- int highattr = BLUE+LIGHTGRAY*16,
- unsigned pgWidth = 80,
- unsigned startColumn = 1,
- int clreol = 1,
- char lineTermChar = '\n',
- char attrToggleChar = '~',
- unsigned tabSpacing = 8);
- ScrLnBuf() { set(); }
- int writebuf(const char *line);
- int put(const char * line, int x = 1, int y = 1)
- { return puttext(x,y,x+writebuf(line)-1,
- y,buf); }
- };
-
- #endif
-